package com.xyy.saas.payment.cores.vo;

import java.io.Serializable;

/**
 * @author wangtianqi
 * @date 2019/11/23 10:12
 */
public class CallbackResultVo implements Serializable {

    /**
     * 交易单类型：支付 成功
     */
    public final static String TYPE_CHARGE_SUCCESS = "charge_success";
    /**
     * 交易单类型：支付 失败
     */
    public final static String PAY_FAIL = "pay_fail";
    /**
     * 交易单类型：退款 成功
     */
    public final static String TYPE_REFUND_SUCCESS = "refund_success";

    /**
     * 交易单类型：签约 成功
     */
    public final static String TYPE_ENTRUST_SIGN_SUCCESS = "entrust_sign_success";

    /**
     * 交易单类型：签约 失败
     */
    public final static String TYPE_ENTRUST_SIGN_FAIL = "entrust_sign_fail";

    /**
     * 交易单类型：解约 成功
     */
    public final static String TYPE_ENTRUST_TERMINATE_SUCCESS = "entrust_terminate_success";

    /**
     * 交易单类型：退款 失败
     */
    public final static String TYPE_REFUND_FAIL = "refund_fail";

    /**
     * 交易单类型：银行卡支付 成功
     */
    public final static String TYPE_BANK_PAY_SUCCESS = "bank_pay_success";

    /**
     * 交易单类型：银行卡支付 退汇
     */
    public final static String TYPE_BANK_PAY_REFUND = "bank_pay_refund";

    /**
     * 交易单类型：银行卡支付 失败
     */
    public final static String TYPE_BANK_PAY_FAIL = "bank_pay_fail";

    /**
     * 交易单类型：微信支付 成功
     */
    public final static String TYPE_WX_PAY_SUCCESS = "wx_pay_success";
    /**
     * 交易单类型：微信支付 失败
     */
    public final static String TYPE_WX_PAY_FAIL = "wx_pay_fail";

    /**
     * 交易单类型：提现 成功
     */
    public final static String TYPE_WITHDRAW_SUCCESS = "withdraw_success";

    /**
     * 交易单类型：提现 退汇
     */
    public final static String TYPE_WITHDRAW_REFUND = "withdraw_refund";

    /**
     * 交易单类型：提现 失败
     */
    public final static String TYPE_WITHDRAW_FAIL = "withdraw_fail";

    /**
     * 交易单类型：开户完成
     */
    public final static String TYPE_OPEN_ACCOUNT_SUCCESS = "open_account_success";

    /**
     * 交易单类型：开通富民基本账户完成
     */
    public final static String TYPE_OPEN_FM_BASE_ACCOUNT_SUCCESS = "open_fm_base_account_success";

    /**
     * 交易单类型：进件审核通过
     */
    public final static String TYPE_CREATE_PAY_PASS = "create_pay_pass";
    /**
     * 交易单类型：进件成功
     */
    public final static String TYPE_CREATE_PAY_SUCCESS = "create_pay_success";

    /**
     * 交易单类型：开户失败
     */
    public final static String TYPE_OPEN_ACCOUNT_FAIL = "open_account_fail";

    /**
     * 开户相关：待确认联系信息
     */
    public final static String APPLYMENT_STATE_WAITTING_FOR_CONFIRM_CONTACT = "APPLYMENT_STATE_WAITTING_FOR_CONFIRM_CONTACT";

    /**
     * 开户相关：待账户验证
     */
    public final static String APPLYMENT_STATE_WAITTING_FOR_CONFIRM_LEGALPERSON = "APPLYMENT_STATE_WAITTING_FOR_CONFIRM_LEGALPERSON";

    /**
     * 开户相关：审核通过
     */
    public final static String APPLYMENT_STATE_PASSED = "APPLYMENT_STATE_PASSED";

    /**
     * 开户相关：已冻结
     */
    public final static String APPLYMENT_STATE_FREEZED = "APPLYMENT_STATE_FREEZED";

    /**
     * 分润/结算失败
     */
    public final static String PROFIT_SHARING_FAIL = "profit_sharing_fail";

    /**
     * 分润/结算成功
     */
    public final static String PROFIT_SHARING_SUCCESS = "profit_sharing_success";

    /**
     * 批量转账成功
     */
    public final static String TRANSFER_ACCOUNTS_SUCCESS = "transfer_accounts_success";
    /**
     * 批量转账失败
     */
    public final static String TRANSFER_ACCOUNTS_FAIL = "transfer_accounts_fail";
    /**
     * 账户修改审核通过
     */
    @Deprecated
    public final static String ACCOUNT_MODIFY_AUDIT_PASS = "account_modify_audit_pass";
    /**
     * 账户修改审核驳回
     */
    @Deprecated
    public final static String ACCOUNT_MODIFY_AUDIT_REJECT = "account_modify_audit_reject";
    /**
     * 账户开户审核通过
     */
    public final static String ACCOUNT_OPEN_AUDIT_PASS = "account_open_audit_pass";
    /**
     * 账户开户审核驳回
     */
    public final static String ACCOUNT_OPEN_AUDIT_REJECT = "account_open_audit_reject";
    /**
     * 银行卡待验证/银行卡审核通过
     */
    public final static String BANK_CARD_AUDIT_PASS = "bank_card_audit_pass";
    /**
     * 银行卡审核失败
     */
    public final static String BANK_CARD_AUDIT_FAIL = "bank_card_audit_fail";

    /**
     * 交易单id
     */
    private String tradeNo;

    /**
     * 业务订单号
     */
    private String businessOrderNo;

    /**
     * 交易单类型 见上
     */
    private String type;

    /**
     * 交易失败时的错误描述信息
     */
    private String msg;

    /**
     * 交易金额（单位为分）
     */
    private Integer amount;
    /**
     * 交易单手续费（单位为分）
     */
    private Integer fee;
    /**
     * 交易成功的Unix时间 精确到秒（失败时为空）
     */
    private Long successTime;

    /**
     * 如果是支付的话，返回支付渠道
     */
    private String channel;

    /**
     * 扩展字段
     */
    private String extend;

    /**
     * 商户号
     */
    private String merchantId;

    /**
     * 渠道订单号
     */
    private String channelOrderNo;

    /**
     * 业务方id
     */
    private String businessId;

    /**
     * 开户状态
     */
    private String settleStatus;

    public String getTradeNo() {
        return tradeNo;
    }

    public void setTradeNo(String tradeNo) {
        this.tradeNo = tradeNo;
    }

    public String getBusinessOrderNo() {
        return businessOrderNo;
    }

    public void setBusinessOrderNo(String businessOrderNo) {
        this.businessOrderNo = businessOrderNo;
    }

    public String getType() {
        return type;
    }

    public void setType(String type) {
        this.type = type;
    }

    public Integer getAmount() {
        return amount;
    }

    public void setAmount(Integer amount) {
        this.amount = amount;
    }

    public Integer getFee() {
        return fee;
    }

    public void setFee(Integer fee) {
        this.fee = fee;
    }

    public Long getSuccessTime() {
        return successTime;
    }

    public void setSuccessTime(Long successTime) {
        this.successTime = successTime;
    }

    public String getChannel() {
        return channel;
    }

    public void setChannel(String channel) {
        this.channel = channel;
    }

    public String getExtend() {
        return extend;
    }

    public void setExtend(String extend) {
        this.extend = extend;
    }

    public String getMsg() {
        return msg;
    }

    public void setMsg(String msg) {
        this.msg = msg;
    }

    public String getMerchantId() {
        return merchantId;
    }

    public void setMerchantId(String merchantId) {
        this.merchantId = merchantId;
    }

    public String getChannelOrderNo() {
        return channelOrderNo;
    }

    public void setChannelOrderNo(String channelOrderNo) {
        this.channelOrderNo = channelOrderNo;
    }

    public CallbackResultVo(String tradeNo, String type, Integer amount, Integer fee, Long successTime, String channel, String businessId, String settleStatus, String merchantId) {
        this(tradeNo, type, amount, fee, successTime, channel, businessId, settleStatus, null, null, null, merchantId);
    }

    public CallbackResultVo(String tradeNo, String type, Integer amount, Integer fee, Long successTime,
                            String channel, String businessId, String settleStatus,
                            String msg, String extend, String businessOrderNo, String merchantId)
    {
        this.tradeNo = tradeNo;
        this.businessOrderNo = businessOrderNo;
        this.type = type;
        this.amount = amount;
        this.fee = fee;
        this.successTime = successTime;
        this.channel = channel;
        this.businessId = businessId;
        this.settleStatus = settleStatus;
        this.msg = msg;
        this.extend = extend;
        this.merchantId = merchantId;
    }

    public CallbackResultVo() {
    }
}
